projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
113aff6
)
tests: Relax a refcount comparison check
author
Benjamin Otte
<otte@redhat.com>
Fri, 16 Dec 2011 12:38:06 +0000
(13:38 +0100)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 16 Dec 2011 12:39:43 +0000
(13:39 +0100)
We now test for real_refcount >= expected_refcount, because various
parts of the code (a11y, selection, cursor, ...) can and do add
references.
gtk/tests/gtktreemodelrefcount.c
patch
|
blob
|
history
diff --git
a/gtk/tests/gtktreemodelrefcount.c
b/gtk/tests/gtktreemodelrefcount.c
index 9c91a587da6b663ff6972c3e0b2a6ab8f04cf85d..2097efb8e163f1091962f0e220ddf5ff219b9046 100644
(file)
--- a/
gtk/tests/gtktreemodelrefcount.c
+++ b/
gtk/tests/gtktreemodelrefcount.c
@@
-239,7
+239,12
@@
check_iter (GtkTreeModelRefCount *ref_model,
}
if (may_assert)
- g_assert_cmpint (expected_ref_count, ==, info->ref_count);
+ {
+ if (expected_ref_count == 0)
+ g_assert_cmpint (expected_ref_count, ==, info->ref_count);
+ else
+ g_assert_cmpint (expected_ref_count, <=, info->ref_count);
+ }
return expected_ref_count == info->ref_count;
}